#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""  
@Project : wupeiqi_async
@File : 02-yield.py
@Author : Royce
@Time : 2025/7/10 10:26  
@脚本说明 : 
"""


def func1():
    yield 1
    yield from func2()  # 创建协程, 去执行func2(), 返回func2的执行结果值
    yield 2


def func2():
    yield 3
    yield 4

if __name__ == '__main__':
    f1 = func1()
    for item in f1:
        print(item)
